package system

import (
	"MoSkeleton/framework/core/dto/request"
)

type SysUserPageReq struct {
	request.PageInfo
	request.BaseRequest
	request.IDRequestOptional
	UserName    string `json:"userName" form:"userName"`
	Phonenumber string `json:"phonenumber" form:"phonenumber"`
	Status      string `json:"status" form:"status"`
	DeptId      uint64 `json:"deptId,string" form:"deptId,string"`
}

type SysUserAddReq struct {
	DeptId      *uint64 `json:"deptId,string"`
	UserName    string  `json:"userName"  binding:"required"`
	NickName    string  `json:"nickName"`
	UserType    string  `json:"userType"`
	Email       string  `json:"email"`
	Phonenumber string  `json:"phonenumber"`
	Sex         string  `json:"sex"`
	Password    string  `json:"password"`
	Status      string  `json:"status"`
	CreatedBy   string  `json:"createdBy"`
	UpdatedBy   string  `json:"updatedBy"`
	Remark      string  `json:"remark"`

	RoleIds []string `json:"roleIds"`
	PostIds []string `json:"postIds"`
}

type SysUserUpdateReq struct {
	request.IDRequest
	DeptId      *uint64 `json:"deptId,string"`
	UserName    string  `json:"userName"  binding:"required"`
	NickName    string  `json:"nickName"`
	UserType    string  `json:"userType"`
	Email       string  `json:"email"`
	Phonenumber string  `json:"phonenumber"`
	Sex         string  `json:"sex"`
	Status      string  `json:"status"`
	UpdatedBy   string  `json:"updatedBy"`
	Remark      string  `json:"remark"`

	RoleIds []string `json:"roleIds"`
	PostIds []string `json:"postIds"`
}
type UpdateAuthRoleReq struct {
	request.IDRequest
	RoleIds string `json:"roleIds" form:"roleIds"`
}

type ResetPasswordReq struct {
	request.IDRequest
	Password string `json:"password"`
}

type UpdateProfileReq struct {
	request.IDRequestOptional
	Email       string `json:"email"  binding:"required"`
	NickName    string `json:"nickName"  binding:"required"`
	Phonenumber string `json:"phonenumber"`
	Sex         string `json:"sex"`
}

type UpdatePasswordReq struct {
	request.IDRequestOptional
	OldPassword string `json:"oldPassword" form:"oldPassword" binding:"required"`
	NewPassword string `json:"newPassword" form:"newPassword" binding:"required"`
}

type ChangeUserStatusReq struct {
	request.IDRequest
	Status    string `json:"status" form:"status" binding:"required"`
	UpdatedBy string `json:"updatedBy"`
}

/*
部门编号	用户名称	用户昵称	用户邮箱	手机号码	用户性别	帐号状态
*/
type UserImportDataItemReq struct {
	DeptId      uint64 `excel:"部门编号"  `
	UserName    string `excel:"用户名称"  binding:"required"`
	NickName    string `excel:"用户昵称"  binding:"required"`
	Email       string `excel:"用户邮箱" `
	Phonenumber string `excel:"手机号码"`
	Sex         string `excel:"用户性别"`
	Status      string `excel:"帐号状态"`
}
